#!/usr/bin/env python

def read(path, section, objects):
    ret = []
    if objects <= 0:
        return ret
    r = open(path, 'r')
    while r.readline().find(section) == -1:
        pass
    obj = 0
    str = r.readline();
    while str.find("#") == -1 and str != "":
        ret.append(str.split(" "))
        str = r.readline()
    r.close()
    return ret

def make_readable(path):
    f_i = open(path, "r")
    f_o = open("Data/Levels/temp.tmp", "w")
    l = f_i.readline()
    while l != "":
        l = l.replace(",", ".")
        l = l.replace("False", "")
        f_o.write(l)
        l = f_i.readline()
    f_o.flush()
    f_i.close()
    f_o.close()
    return "Data/Levels/temp.tmp"
    
    